package com.homedo.microservice.open.service.gateway.zuul.conf;

import com.google.common.collect.Lists;

import java.util.List;
import java.util.concurrent.atomic.AtomicReference;

public class ZuulFilterActiveConf {
    private static ZuulFilterActiveConf zuulFilterActiveConf = new ZuulFilterActiveConf();

    private static final AtomicReference<List<String>> activeFilterNamesRef = new AtomicReference<List<String>>(Lists.newArrayList());

    private ZuulFilterActiveConf() {
    }

    public List<String> getActiveFilterNames() {
        return activeFilterNamesRef.get();
    }

    public void setActiveFilterNames(List<String> activeFilterNames) {
        activeFilterNamesRef.set(activeFilterNames);
    }

    public static ZuulFilterActiveConf getInstance() {
        return zuulFilterActiveConf;
    }
}
